
import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home,
    meta:{
      isShow:false,
    },
    children :[
      {
        path: '/funtion1',
        name: 'Funtion1',
        component: () => import(/* webpackChunkName: "funtion1" */ '../views/Funtion1.vue'),
        meta:{
          isShow:true,
          title:'学生注册登记',
        }
      },
      {
        path: '/funtion2',
        name: 'Funtion2',
        component: () => import(/* webpackChunkName: "funtion1" */ '../views/Funtion2.vue'),
        meta:{
          isShow:true,
          title:'学生成绩登记',
        }
      },
      {
        path: '/funtion3',
        name: 'Funtion3',
        component: () => import(/* webpackChunkName: "funtion1" */ '../views/Funtion3.vue'),
        meta:{
          isShow:true,
          title:'学生信息查询',
        }
      },
      {
        path: '/funtion4',
        name: 'Funtion4',
        component: () => import(/* webpackChunkName: "funtion1" */ '../views/Funtion4.vue'),
        meta:{
          isShow:true,
          title:'学生信息修改',
        }
      },
      {
        path: '/funtion5',
        name: 'Funtion5',
        component: () => import(/* webpackChunkName: "funtion1" */ '../views/Funtion5.vue'),
        meta:{
          isShow:true,
          title:'资料统计',
        }
      },
    ]
  },
  {
    path: '/',
    name: 'Login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: Login,
    //component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    meta:{
      isShow:false,
    }
  },
  
  
]

const router = createRouter({
  history: createWebHashHistory(),
  routes: routes
})

export default router
